

import java.util.Scanner;

public class NameSearch {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        /********** Begin *********/
        String data = scanner.next();
        String name = scanner.next();
        int i = 0;
        int j = 0;
        while(j!=-1){
            j=data.indexOf(name);
            i += j;
            data = data.substring(j+name.length());
            if(j!=-1)
                System.out.println(i);
            i+=name.length();
        }
        /********** End *********/
    }
}

